{include file="public/header"/}
{include file="public/navleft" }

<div class="tpl-content-wrapper">
    <div class="tpl-content-page-title">
        医院快速增加 表单
    </div>
    <ol class="am-breadcrumb">
        <li><a href="{:url('index/index')}" class="am-icon-home">首页</a></li>
        <li><a href="#">表单</a></li>
        <li class="am-active">快速添加医院表单</li>
    </ol>
    <div class="tpl-portlet-components">

        <div id="SerachHospital">

            <div class="portlet-title">
                <div class="caption font-green bold">
                    <span class="am-icon-code"></span> 表单
                </div>
                <div class="tpl-portlet-input tpl-fz-ml">
                    <div class="portlet-input input-small input-inline">
                        <div class="input-icon right">
                            <i class="am-icon-search"></i>
                            <input type="text" class="form-control form-control-solid" placeholder="搜索...">
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <div class="tpl-block ">



            <div class="am-g tpl-amazeui-form">


                <div class="am-u-sm-12 am-u-md-9">
                    <form class="am-form am-form-horizontal" method="post" action="{:url('hospital/add')}">

                        <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">区域代号</label>
                            <div class="am-u-sm-9">
                                <select
                                    data-am-selected="{searchBox: 1,btnWidth: '100%',maxHeight: 150,btnStyle: 'secondary',}"
                                    id="qy">
                                    <option value="zac-no">不晓得---不填</option>
                                    {volist name='data' id='v'}
                                    <option value="{$v.qydh}">{$v.qydh}----{$v.qyname}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>


                        <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">医院代号： / IDs</label>
                            <div class="am-u-sm-9">
                                <input type="text" id="user-name" name="dh" placeholder="代号 / id">
                                <small>输入医院代号**六位数***。</small>
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label for="user-name" class="am-u-sm-3 am-form-label">医院名称： / Name</label>
                            <div class="am-u-sm-9">
                                <input type="text" id="user-names" name="mc" placeholder={$data.mc|default="名称" }>
                                <small>输入医院名称**。</small>
                            </div>
                        </div>

                        <div class="am-checkbox" style="margin-left: 26%">
                            <label>
                                <input type="checkbox" checked> ***是否添加电子章***
                            </label>
                        </div>

                        <div class="am-form-group" style="margin-top: 4%">
                            <div class="am-u-sm-9 am-u-sm-push-6">
                                <button type="button" class="am-btn am-btn-primary"
                                    onclick="hospital.add()">点击增加</button>
                            </div>
                            <!--<button type="button" class="am-btn am-btn-success">删除医院</button>-->
                        </div>


                    </form>

                </div>
            </div>
        </div>

    </div>

</div>



<script type="text/javascript">
var vm = new Vue({
    el: '#SerachHospital',
    data: {
        signName: "",
        url: "__STATIC__/image/e2c1990d78744bf6a2897c8d0432e7bb.png"
    },
    methods: {
        onBlueCreateSign: function() {
            console.log(signName);
        },
        onCreateSign: function() {
            //var _this = this;
            if (this.signName == '') {
                this.$message({
                    message: '错了哦，***新员工姓名不能为空***不能为空！',
                    center: true,
                    type: 'error'
                });
                return;
            }
            axios.get('/index.php/index/Commapi/GetSignName', {
                    params: {
                        signName: this.signName
                    }
                }).then(
                    (response) => {
                        if (response.data.data.status = 1)
                            this.url = response.data.data;
                        this.$message({
                            message: '生成成功',
                            center: true,
                            type: 'success'
                        });
                        console.log(response);
                    }
                )
                .catch(error => {
                    this.$message({
                        message: error.response.data.message ? error.response.data.message :
                            '网络异常',
                        type: 'warning'
                    })
                });
        }
    }
})
</script>

{include file="public/footer"/}